from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QScrollArea
from PyQt5.QtCore import Qt, QTimer


class TextScroller(QWidget):
    def __init__(self, text: str):
        super().__init__()
        self._text = text
        layout = QVBoxLayout(self)
        self.scroll = QScrollArea()
        self.scroll.setWidgetResizable(True)
        self.container = QWidget()
        inner = QVBoxLayout(self.container)
        self.label = QLabel(text)
        self.label.setWordWrap(True)
        inner.addWidget(self.label)
        self.scroll.setWidget(self.container)
        layout.addWidget(self.scroll)

